﻿// memcheck.cpp: 定义应用程序的入口点。
//


#include "memcheck.h"
#include "config.h"
#include <time.h>

using namespace std;

int main()
{
	cout << "Hello CMake。" << endl;

    char com[30];

    strcpy(com,"COM1");

	string id = utils::GetConfigFileStringValue("GATEWAY", "id", "12345567");
	int port = utils::GetConfigFileIntValue("GATEWAY", "port", 9090);
    for (int i = 0;i<20;i++)
        string strcom = utils::GetConfigFileStringValue("COM",com,com);

	struct tm *tm;
	time_t t;
	char szTime[50];

	t = time(NULL);
	tm = gmtime(&t);
	strftime(szTime, sizeof(szTime), "%Y-%m-%d %H:%M:%S", tm);

	cout << id <<":"<< port<<string(szTime);
	char *ab = (char*)malloc(100);
	return 0;
}
